﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IDAL
{
    public interface IFavorite
    {
        /// <summary>
        /// 添加网址夹
        /// </summary>
        /// <param name="favorite">网址夹实体</param>
        /// <returns>受影响的行数</returns>
        int AddFavorite(Model.Favorite favorite);
        /// <summary>
        /// 通过用户查询其网址夹
        /// </summary>
        /// <param name="uid">用户编号</param>
        /// <returns>网址夹集合</returns>
       IList<Model.Favorite> GetFavorite(int uid);

        /// <summary>
        /// 查询用户最顶层网址夹
        /// </summary>
        /// <param name="uid">用户编号 </param>
        /// <returns>网址夹集合</returns>
        IList<Model.Favorite> GetTopFavorite(int uid);

        /// <summary>
        /// 通过父网址夹查询子网址夹
        /// </summary>
        /// <param name="pid">父网址夹编号</param>
        /// <returns>网址夹集合</returns>
        IList<Model.Favorite> GetChildFavorite(int pid);
    }
}
